<title>我的交易</title>
<div id="change" style="padding-top: 3em;" ng-init="shop.infoList=1">
	<div class="choose">
		<div class="mui-content">
			<div class="mui-row" style="position: fixed;top: 0px;width: 100%;z-index: 999;">
				<div class="mui-col-sm-4 mui-col-xs-4">

					<a ng-class="{active:shop.infoList==1}" ng-click="changeInfoList(1)">
						持仓订单
						<hr />
					</a>

				</div>
				<div class="mui-col-sm-4 mui-col-xs-4">

					<a ng-class="{active:shop.infoList==2}" ng-click="changeInfoList(2)">
						历史订单
						<hr />
					</a>

				</div>
				<div class="mui-col-sm-4 mui-col-xs-4">

					<a ng-class="{active:shop.infoList==3}" ng-click="changeInfoList(3)">
						我的账户
						<hr />
					</a>

				</div>
			</div>
		</div>
		<div ng-if="shop.infoList==1" class="page" id="infoListBox">
			<!--没绑定时当前持仓状态-->
			<div class="allCenter nohas" ng-if="nohas">
				<img src="img/Unbound_account.png" alt="" />
				<p>您还没有绑定账户哦</p>
				<a href="#/binding">马上绑定</a>
			</div>
			<!--审核中-->
			<div class="allCenter nohas" ng-if="waite">
				<img src="img/Unbound_account.png" alt="" />
				<p>您申请绑定的账号<span>{{mtLogin}}</span>，正在审核中<br />请耐心等待</p>

			</div>
			<!--审核失败-->
			<div class="allCenter nohas" ng-if="waiteNo">
				<img src="img/Unbound_account.png" alt="" />
				<p>您申请绑定的账号<span>{{mtLogin}}</span><span class="span2">未通过</span>审核 请核对信息后重新绑定
				</p>

			</div>
			<!--绑定审核和没有持仓记录时-->
			<div class="allCenter nohas" ng-if="noRecord">
				<img src="img/Not_documentary.png" alt="" />
				<p>当前没有持仓记录哦~</p>
				<!--<a href="#/follow/list"> <img  alt="" class="newImg" ng-src="{{x.iconUrl || 'img/timg.png'}}" /></a>-->
			</div>

			<!--拥有记录的-->
			<div ng-if="hasRecord">
				<div ng-repeat="y in myChi">
					<div class="center shop.infoListBox" ng-repeat="x in y">
						<div class="inner">
							<div class="top">
								<div class="mui-content">
								</div>
								<div class="mui-row">
									<div class="mui-col-sm-6 mui-col-xs-6">
										<li class="mui-table-view-cell">
											<p style="color: #000000;">{{x.order || 0}}</p>
										</li>
									</div>
									<div class="mui-col-sm-6 mui-col-xs-6">
										<li class="mui-table-view-cell" style="float: right;font-size: 1.6em;">
											<span class="green" ng-if="x.profit>0">{{x.profit/100 | currency}}</span>
											<span class="red" ng-if="x.profit<0">{{x.profit/100 | currency}}</span>
											<span class="yellow" ng-if="x.profit==0">{{x.profit/100 | currency}}</span>
										</li>
									</div>
								</div>
							</div>
							<hr />
							<div class="wrap mui-clearfix">
								<div class="mui-row mui-clearfix">
									<div class="mui-col-sm-3 mui-col-xs-3 mui-clearfix">

										<img alt="" class="newImg" ng-src="{{x.iconUrl || 'img/timg.png'}}" />

									</div>
									<div class="mui-col-sm-9 mui-col-xs-9 mui-clearfix" style="margin-top: 0.5em;font-size: 1.2em;">
										<div class="mui-row mui-clearfix" style="margin-left: 0.5em;line-height: 2em;">
											<div class="mui-col-sm-8 mui-col-xs-8">
												<span class="gray">{{x.openTime|date:'yyyy-MM-dd HH:mm:ss' || 0}}</span>
											</div>
											<div class="mui-col-sm-4 mui-col-xs-4" style="text-align: right;">
												<span>{{x.openPrice || 0}}</span>
												<span class="red" ng-if="x.cmd==0">多</span>
												<span class="green" ng-if="x.cmd==1">空</span>

											</div>
											<div class="mui-col-sm-3 mui-col-xs-3">
												<span class="gray">止   损</span>

											</div>
											<div class="mui-col-sm-3 mui-col-xs-3">

												<span>{{x.sl || 0}}</span>
											</div>
											<div class="mui-col-sm-3 mui-col-xs-3">
												<span class="gray">手 数</span>

											</div>
											<div class="mui-col-sm-3 mui-col-xs-3" style="text-align: right;">

												<span>{{x.volume/10000 || 0 |number:2}}手</span>
											</div>
											<div class="mui-col-sm-3 mui-col-xs-3">
												<span class="gray">止   盈</span>

											</div>
											<div class="mui-col-sm-3 mui-col-xs-3">

												<span>{{x.tp || 0}}</span>
											</div>
											<div class="mui-col-sm-3 mui-col-xs-3">
												<span class="gray">盈 利</span>

											</div>
											<div class="mui-col-sm-3 mui-col-xs-3" style="text-align: right;">

												<span class="green" ng-if="x.point>0">{{x.point || 0}}</span>
												<span class="red" ng-if="x.point<0">{{x.point || 0}}</span>
												<span class="yellow" ng-if="x.point==0">{{x.point}}</span><span>点</span>
											</div>
										</div>

									</div>

								</div>
								<div class="mui-row mui-clearfix">
									<div class="mui-col-sm-6 mui-col-xs-6">
										<p style="color: #000000;font-size: 1.5em;font-weight: bolder;margin-left: 0.2em;">{{x.symbol}}</p>
										<span class="tui">跟</span> <span style="margin-left: 0.3em;">{{x.name || 0}}</span>
									</div>
									<div class="mui-col-sm-6 mui-col-xs-6" style="text-align: right;margin-top: 0.8em;">
										<button type="button" class="mui-btn mui-btn-primary" ng-click="ping(x.order)">立即平仓</button>
									</div>

								</div>
							</div>

						</div>

					</div>
				</div>
				<p class="noMore" ng-if="info_noChiList">到底啦~</p>
				<br />
				<br />
				<br />
				<br />

			</div>

		</div>
		<div ng-if="shop.infoList==2" class="page" id="infoListBox2">
			<!--没有绑定时候-->

			<div class="allCenter nohas" ng-if="nohas">
				<img src="img/Unbound_account.png" alt="" />
				<p>您还没有绑定账户哦</p>
				<a href="#/binding">马上绑定</a>
			</div>
			<!--审核中-->
			<div class="allCenter nohas" ng-if="waite">
				<img src="img/Unbound_account.png" alt="" />
				<p>您申请绑定的账号<span>{{mtLogin}}</span>，正在审核中<br />请耐心等待</p>

			</div>
			<!--未审核-->
			<div class="allCenter nohas" ng-if="waiteNo">
				<img src="img/Unbound_account.png" alt="" />
				<p>您申请绑定的账号<span>{{mtLogin}}</span><span class="span2">未通过</span>审核 请核对信息后重新绑定
				</p>

			</div>
			<!--没有记录-->
			<div class="allCenter nohas" ng-show="noLu">
				<img src="img/Not_documentary.png" alt="" />
				<p>当前没有历史记录哦~</p>
				<!--<a href="#/follow/list"> <img  alt="" class="newImg" ng-src="{{x.iconUrl || 'img/timg.png'}}" /></a>-->
			</div>

			<!--有记录-->
			<div ng-if="hasLu">
				<div ng-repeat="y in myHistory">
					<div class="center shop.infoListBox" ng-repeat="x in y">
						<div class="inner">
							<div class="top">
								<div class="mui-content">
								</div>
								<div class="mui-row">
									<div class="mui-col-sm-6 mui-col-xs-6">
										<li class="mui-table-view-cell">
											<p style="color: #000000;">{{x.order || 0}}</p>
										</li>
									</div>

									<div class="mui-col-sm-6 mui-col-xs-6" style="text-align: right;margin-top: 0.9em;">

										<span class="redYuan" ng-if="x.cmd==0">多</span>
										<span class="greenYuan" ng-if="x.cmd==1">空</span>
									</div>
								</div>
							</div>
							<hr />
							<div class="wrap mui-clearfix">
								<div class="mui-row mui-clearfix">
									<div class="mui-col-sm-3 mui-col-xs-3 mui-clearfix">

										<img alt="" class="newImg" ng-src="{{x.iconUrl || 'img/timg.png'}}" />

									</div>
									<div class="mui-col-sm-9 mui-col-xs-9 mui-clearfix" id="spectilf">
										<div class="mui-row mui-clearfix" style="margin-left: 0.5em;">

											<div class="mui-col-sm-5 mui-col-xs-5">
												<span class="gray">开 仓</span>
												<span style="float: right;">{{x.openPrice || 0}}点</span>

											</div>

											<div class="mui-col-sm-7 mui-col-xs-7" style="text-align: right;">
												<span>{{(x.openTime |date:'yyyy-MM-dd HH:mm:ss') || 0}}</span>

											</div>
											<div class="mui-col-sm-5 mui-col-xs-5">
												<span class="gray">平 仓</span>
												<span style="float: right;">{{x.closePrice || 0}}点</span>

											</div>
											<div class="mui-col-sm-7 mui-col-xs-7" style="text-align: right;">
												<span>{{((x.closeTime || 0) |date:'yyyy-MM-dd HH:mm:ss' )}}</span>

											</div>

											<div class="mui-col-sm-5 mui-col-xs-5">
												<span class="gray">手   数</span>
												<span style="float: right;">{{x.volume/10000 || 0 |number:2}}手</span>

											</div>

											<div class="mui-col-sm-3 mui-col-xs-3" style="text-align: right;">
												<span class="gray">盈 利</span>

											</div>
											<div class="mui-col-sm-4 mui-col-xs-4" style="text-align: right;">

												<span class="green" ng-if="x.point>0">{{x.point}}</span>
												<span class="red" ng-if="x.point<0">{{x.point}}</span>
												<span class="yellow" ng-if="x.point==0">{{x.point}}</span><span>点</span>
											</div>

											<!--<div class="mui-col-sm-5 mui-col-xs-5">
										<span class="gray">止 损</span>
										<span style="float: right;">{{x.sl}}</span>
									</div>
									<div class="mui-col-sm-3 mui-col-xs-3" style="text-align: right;">
										<span class="gray">止 盈</span>
										
									</div>
									<div class="mui-col-sm-4 mui-col-xs-4" style="text-align: right;">
										
										<span>{{x.tp}}</span>
									</div>-->

										</div>

									</div>
								</div>
								<div class="mui-row mui-clearfix">
									<div class="mui-col-sm-6 mui-col-xs-6">
										<p style="color: #000000;font-size: 1.5em;font-weight: bolder;margin-left: 0.2em;">{{x.symbol}}</p>

										<span class="tui">跟</span> <span style="margin-left: 0.3em;">{{x.name}}</span>
									</div>
									<div class="mui-col-sm-6 mui-col-xs-6" style="text-align: right;margin-top: 1em;font-size: 1.6em;">
										<!--<button type="button" class="mui-btn mui-btn-primary">立即平仓</button>-->
										<span class="green" ng-if="x.profit>0">{{x.profit | currency}}</span>
										<span class="red" ng-if="x.profit<0">{{x.profit | currency }}</span>
										<span class="yellow" ng-if="x.profit==0">{{x.profit | currency}}</span>
									</div>

								</div>
							</div>

						</div>

					</div>
				</div>
				<p class="noMore" ng-if="info_noHistoryList">到底啦~</p>
				<br />
				<br />
				<br />
				<br />
			</div>
		</div>
		<div ng-show="shop.infoList==3" class="page" id="infoListBox3">
			<!--没绑定-->

			<div class="allCenter nohas" ng-if="nohas">
				<img src="img/Unbound_account.png" alt="" />
				<p>您还没有绑定账户哦</p>
				<a href="#/binding">马上绑定</a>
			</div>

			<!--绑定完-->
			<div ng-show="hasInfo">
				<!--<div>-->
				<div class="myHead">
					<div class="inner">
						<div class="headBox" id="headBtn">
							<img src="" ng-src="{{infoList.icon || 'img/timg.png'}}" />
							<div class="wrap">
								<i class="mui-icon mui-icon-compose"></i>

							</div>
						</div>

						<p>{{infoList.login || ""}}</p>
						<!--<input type="text" name="" id="" value="不在沉默中爆发，就在沉默中消亡" />-->

					</div>

				</div>
				<div class="center alist" style="margin-top: 0;">
					<div class="mui-row" style="padding: 0.3em 0.938em ;">
						<div class="mui-col-sm-6 mui-col-xs-6">
							<span>账&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</span>
							<!--<span class="state green" ng-if="available=='0'">已绑定</span>
							<span class="state red" ng-if="available=='2'">绑定失败</span>
							<span class="state blue" ng-if="available=='1'">审核中</span>-->

						</div>
						<div class="mui-col-sm-6 mui-col-xs-6" style="text-align: right;">
							<span>{{infoList.login || "/"}}</span>
						</div>
						<!--<div class="mui-col-sm-4 mui-col-xs-4 boderbottom" style="border: none;">
							<span>昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称</span>
						</div>

						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;border: none;">
							<span>{{infoList.name || "/"}}</span>
						</div>-->
						<div class="mui-col-sm-4 mui-col-xs-4 boderbottom" style="border: none;">
							<span>跟单金额</span>
						</div>

						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;border: none;">
							<span>{{infoList.amount || 0 |number:2 }}</span>
						</div>

						<div class="mui-col-sm-4 mui-col-xs-4 boderbottom">
							<span>杠杆比例</span>
						</div>

						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;">
							<span ng-if="infoList.leverage">1:{{infoList.leverage}}</span>
							<span ng-if="!infoList.leverage"> /</span>

						</div>
						<!--<div class="mui-col-sm-4 mui-col-xs-4 boderbottom" style="border: none;">
							<span>浮动盈亏</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;border: none;">
							<span>{{infoList.floating || "/"}}</span>
						</div>-->
						<div class="mui-col-sm-4 mui-col-xs-4 boderbottom" style="border: none;">
							<span>当前信用额</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;border: none;">
							<span>{{infoList.credit  || 0 |number:2 }}</span>
						</div>
						<div class="mui-col-sm-4 mui-col-xs-4 boderbottom">
							<span>初始资金</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;">
							<span>{{infoList.initBalance  || 0 |number:2 }}</span>
						</div>
						<!--<div class="mui-col-sm-4 mui-col-xs-4 boderbottom" style="border: none;">
							<span>当前净值</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;border: none;">
							<span>{{infoList.equity || "/"}}</span>
						</div>-->
						<div class="mui-col-sm-4 mui-col-xs-4 boderbottom" style="border: none;">
							<span>当前余额</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;border: none;">
							<span>{{infoList.currentBalance  || 0 |number:2 }}</span>
						</div>
						<div class="mui-col-sm-4 mui-col-xs-4 boderbottom">
							<span>累计入金</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;">
							<span>{{infoList.balance || 0  |number:2  }}</span>
						</div>
						<div class="mui-col-sm-4 mui-col-xs-4 boderbottom" style="border: none;">
							<span>累计盈利</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;border: none;">
							<span>{{infoList.profit  || 0   |number:2  }}</span>
						</div>
						<div class="mui-col-sm-4 mui-col-xs-4 boderbottom">
							<span>累计出金</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;">
							<span>{{infoList.withdrawal  || 0  |number:2 }}</span>
						</div>
						<div class="mui-col-sm-4 mui-col-xs-4 boderbottom" style="border: none;">
							<span>年化收益</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;border: none;">
							<span>{{infoList.year || 0  |number:2 }}</span>
						</div>
						<!--<div class="mui-col-sm-4 mui-col-xs-4 boderbottom" style="border: none;">
							<span>最大撤回</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;border: none;">
							<span>{{infoList.maxDrawdown || "/"}}</span>
						</div>-->
						<div class="mui-col-sm-4 mui-col-xs-4 boderbottom" style="border: none;">
							<span>交易时长</span>
						</div>
						<div class="mui-col-sm-8 mui-col-xs-8 boderbottom" style="text-align: right;border: none;">
							<span>{{(infoList.createTime || 0) }}天</span>
						</div>

					</div>
				</div>
				<!--<button type="button" class="mui-btn mui-btn-primary" style="background: rgba(178, 178, 178, 1);border-color: rgba(178, 178, 178, 1) ;width: 44%;margin: 0.238em 0 0.938em 0.938em;height:3.125em" onclick="goChangeInfoPass()">
    		更改密码 </button>-->
				<button type="button" class="mui-btn mui-btn-danger" style="width: 93%;margin: 0.238em 0 0.938em 0.938em;height: 3.125em;" ng-click="changeAccount()">变更账户</button>
			</div>

			<br />
			<br />
			<br />
			<br />

		</div>
	</div>
</div>
<script>
	//	$('.page').height($(window).height() - $('#onepage').height() - 100);

	console.log($("footer").height() - 70)

	function goChangeInfoPass() {
		window.location.href = "#/changePass"

	}
	layui.use('upload', function() {
		var upload = layui.upload;
		//执行实例
		var uploadInst = upload.render({
			elem: '#headBtn' //绑定元素
				,
			url: '/wechat_mt5/user/upload/icon' //上传接口		
				,
			field: "uploadFile",
			before: function(obj) { //obj参数包含的信息，跟 choose回调完全一致，可参见上文。
				obj.preview(function(index, file, result) {
					$('#headBtn img').attr('src', result); //图片链接（base64）
				});
			},
			done: function(res) {
				//上传完毕回调
				if(res.code == 0) {
					mui.alert("修改成功");
				} else if(res.code==10050003){
					mui.alert("修改失败，图片文件过大，请换其他图片！");
				}
				else{
					mui.alert("修改失败");
				}


			},
			error: function() {
				//请求异常回调
			}
		});
	});
</script>